package com.io.file;

import java.io.File;
import java.io.FilenameFilter;

public class DirFilter implements FilenameFilter {

	String file;

	public DirFilter(String file) {
		this.file = file;
	}

	@Override
	public boolean accept(File dir, String name) {
		String f = new File(name).getName();
		return f.indexOf(this.file) != -1;
	}
}
